﻿using Abp.Dependency;
using Mt.Site.Core.WorkFlows.Process.Models;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Mt.Site.Core.WorkFlows.Process
{
    public interface IWorkFlowSuperManager
    {
        /// <summary>
        /// 流程使用者删除拟稿箱里的稿件
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task DeleteAsync(List<Guid> idList);


        /// <summary>
        /// 管理员删除稿件（稿件要先作废才能删除）
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task SuperDeleteAsync(List<Guid> idList);

        Task DeleteArchiveAsync(Guid paperId);

        /// <summary>
        /// 作废稿件 
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task CancelAsync(List<Guid> idList);

        /// <summary>
        /// 还原作废的稿件（是否应该要记录操作日志？） 
        /// </summary>
        /// <param name="idList"></param>
        /// <returns></returns>
        Task RestoreAsync(List<Guid> idList);

        /// <summary>
        /// 已办结的稿件恢复执行
        /// </summary>
        /// <param name="paperId"></param>
        /// <returns></returns>
        Task ResumeExecuteAsync(Guid paperId);


        //编辑
        Task<GetFormDataOutput> GetFormDataForEditAsync(Guid paperId);

        Task UpdateFormDataAsync(UpdateFormDataInput input);


        //  回滚
        Task RollBack(Guid taskId, Guid paperId);

        Task UpdateReplyMsgAsync(Guid taskId,string replyMsg);

        Task UpdateAdditionalMsgAsync(long msgId, string replyMsg);

        Task RemoveTemporaryPaperAsync();

        Task SetPaperUnMarked(Guid id);

        Task UpdateAduditTimeAsync(DateTime startTime, DateTime markTime, DateTime finishTime, Guid id);
        
        Task ArchiveAsync(Guid paperId);

        Task ResetRuntimeDataAsync(Guid paperId);
    }
}
